package cn.codergege.packagename.service.impl;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.codergege.packagename.dao.EmployeeMapper;
import cn.codergege.packagename.model.Employee;
import cn.codergege.packagename.service.EmployeeService;

@Service("employeeService")
public class EmployeeServiceImpl implements EmployeeService {
	final Logger log = LoggerFactory.getLogger(EmployeeServiceImpl.class);
	@Autowired
	private EmployeeMapper employeeMapper;

	@Override
	public int deleteByPrimaryKey(Integer id) throws Exception {
		return employeeMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(Employee record) throws Exception {
		return employeeMapper.insert(record);
	}

	@Override
	public int insertSelective(Employee record) throws Exception {
		return employeeMapper.insertSelective(record);
	}

	@Override
	public Employee selectByPrimaryKey(Integer id) {
		return employeeMapper.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKeySelective(Employee record) throws Exception {
		return employeeMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(Employee record) throws Exception {
		return employeeMapper.updateByPrimaryKey(record);
	}

	@Override
	public List<Employee> getAll() {
		return employeeMapper.getAll();
	}

}
